'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller, middleware } = app;
  const counter = middleware.counter();
  router.get('/', counter, controller.home.index);
  router.get('/index', controller.garvin.index);
  // router.get('/getGirls', controller.garvin.getGirls);
  router.get('/getQuery', controller.garvin.getQuery);
  router.get('/getParam/:name/:age', controller.garvin.getParam);
  router.post('/postAdd', controller.garvin.postAdd);
  router.post('/add', controller.home.add);
  router.post('/del', controller.home.del);
  router.post('/editor', controller.home.editor);
  router.post('/show', controller.home.show);
  router.post('/getContext', controller.home.getContext);
  router.post('/postRequest', controller.home.postRequest);
  router.get('/getResponse', controller.home.getResponse);
  // mysql操作
  router.get("/addGirl", controller.girlManage.addGirl);
  router.get("/delGirl", controller.girlManage.delGirl);
  router.get("/updateGirl", controller.girlManage.updateGirl);
  router.get("/getGirls", controller.girlManage.getGirls);
};
